gtk4.git
9 years agoAdwaita: ensure titlebar corners are not rounded...
Lapo Calamandrei [Sat, 16 Apr 2016 09:58:14 +0000 (11:58 +0200)]
Adwaita: ensure titlebar corners are not rounded...

...when the window is maximized or tiled, by using more specific
selectors, since there were cases of erroneusly rounded corners.
See https://bugzilla.gnome.org/show_bug.cgi?id=765038

9 years agowayland: Implement virtual modifiers
Matthias Clasen [Sat, 16 Apr 2016 02:20:25 +0000 (22:20 -0400)]
wayland: Implement virtual modifiers

Since Wayland is using libxkbcommon, it inherits X unfortunate
real/virtual modifier distinction, so we have to do the same
gymnastics we do for X to map between the two.

This should fix matching of accelerators using virtual modifiers
(modulo gnome-shell bugs regarding the handling of Super).

https://bugzilla.gnome.org/show_bug.cgi?id=764424

9 years agoClarify docs a bit
Matthias Clasen [Sat, 16 Apr 2016 02:13:30 +0000 (22:13 -0400)]
Clarify docs a bit

The wording here was just awkward: TRUE is returned if... Note that
FALSE is also returned if...

9 years agogtk-builder-tool: use g_printf() instead of g_print()
Руслан Ижбулатов [Fri, 15 Apr 2016 17:37:49 +0000 (17:37 +0000)]
gtk-builder-tool: use g_printf() instead of g_print()

1) g_print() can be redirected
2) g_print() does some extra processing, such as character set conversion.
   Specifically, on W32 it will detect system codepage via GetACP(),
   and will convert UTF-8 output into that codepage, even though
   the output should stay unchanged (whether gtk-builder-tool interprets
   strings from ui files as UTF-8 is a separate matter).

https://bugzilla.gnome.org/show_bug.cgi?id=765118

9 years agoAdwaita: really fix solid-csd
Lapo Calamandrei [Fri, 15 Apr 2016 16:28:26 +0000 (18:28 +0200)]
Adwaita: really fix solid-csd

add a specificity bump hack in the titlebar solid-csd styling to
avoid being overridden by the split titlebar theme logic.

9 years agoAdwaita: fix backdrop solid-csd
Lapo Calamandrei [Fri, 15 Apr 2016 16:00:37 +0000 (18:00 +0200)]
Adwaita: fix backdrop solid-csd

titlebar rounded corners were not overridden for backdrop state.

9 years agoAdwaita: better solid-csd styling
Lapo Calamandrei [Fri, 15 Apr 2016 14:51:29 +0000 (16:51 +0200)]
Adwaita: better solid-csd styling

9 years agoGDK W32: Fix positioning of reparented window
Jeremy Tan [Fri, 15 Apr 2016 11:22:20 +0000 (19:22 +0800)]
GDK W32: Fix positioning of reparented window

MoveWindow should not be used over the pre-existing move/resize
functions, which already correctly position a window with respect
to its parent, while also taking into account the size of window
decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=765100

9 years agoinspector: Don't lie with statistics
Matthias Clasen [Fri, 15 Apr 2016 02:52:59 +0000 (22:52 -0400)]
inspector: Don't lie with statistics

If we don't have statistics, despite GOBJECT_DEBUG being set,
explain how to fix this.

9 years agoGtkBuilder: Mention how GVariant properties are parsed
Matthias Clasen [Thu, 14 Apr 2016 19:30:59 +0000 (15:30 -0400)]
GtkBuilder: Mention how GVariant properties are parsed

9 years agoiconhelper: Invalidate on clear()
Benjamin Otte [Thu, 14 Apr 2016 19:03:27 +0000 (21:03 +0200)]
iconhelper: Invalidate on clear()

When clearing the icon helper, we need to invalidate it. Otherwise the
previous icon keeps lingering along.
This is not relevant inside gtkiconhelper.c where other code causes the
invalidation, but happens when external code calls
_gtk_icon_helper_clear().

https://bugzilla.gnome.org/show_bug.cgi?id=765066

9 years agoFix label css test
Matt Watson [Wed, 13 Apr 2016 19:46:01 +0000 (12:46 -0700)]
Fix label css test

The default font size of 10pt will now properly render as 13.33px,
but we shouldn't use the default anyway as that can be controlled
by user settings

9 years agocups: make string non-literals translatable again
Felipe Borges [Wed, 13 Apr 2016 18:00:19 +0000 (20:00 +0200)]
cups: make string non-literals translatable again

Notice that C_ just takes string literals as arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=764585

9 years agogtkplacessidebar: don't margins in the code
Sebastien Bacher [Thu, 17 Mar 2016 12:57:41 +0000 (13:57 +0100)]
gtkplacessidebar: don't margins in the code

those should rather be defined by the theme
https://bugzilla.gnome.org/show_bug.cgi?id=763768

9 years agoGtkWindow: Ensure the toplevel is realized before realizing popovers
Carlos Garnacho [Thu, 14 Apr 2016 09:05:00 +0000 (11:05 +0200)]
GtkWindow: Ensure the toplevel is realized before realizing popovers

Otherwise those get a NULL parent window, which is toplevel-y enough
to disembody the popover.

https://bugzilla.gnome.org/show_bug.cgi?id=764060

9 years agoGDK W32: Fix bounding rect calculation on window creation The bounding rect specifies...
Jeremy Tan [Wed, 13 Apr 2016 13:39:46 +0000 (21:39 +0800)]
GDK W32: Fix bounding rect calculation on window creation The bounding rect specifies the top left and bottom right corners - the bottom right corner must account for the current window position.

https://bugzilla.gnome.org/show_bug.cgi?id=764996

9 years agoUpdated POTFILES.skip
Piotr Drąg [Wed, 13 Apr 2016 13:29:48 +0000 (15:29 +0200)]
Updated POTFILES.skip

9 years agocups: Fix more "format not a string literal" error
Felipe Borges [Tue, 12 Apr 2016 13:55:19 +0000 (15:55 +0200)]
cups: Fix more "format not a string literal" error

https://bugzilla.gnome.org/show_bug.cgi?id=764585

9 years agoupdate zh_CN translation
YunQiang Su [Wed, 13 Apr 2016 12:14:44 +0000 (20:14 +0800)]
update zh_CN translation

9 years agoupdate zh_CN translation
YunQiang Su [Wed, 13 Apr 2016 08:41:00 +0000 (16:41 +0800)]
update zh_CN translation

9 years agoreftests: test rem size
Matt Watson [Tue, 12 Apr 2016 04:35:09 +0000 (21:35 -0700)]
reftests: test rem size

9 years agoreftests: test em size
Matt Watson [Mon, 11 Apr 2016 23:17:08 +0000 (16:17 -0700)]
reftests: test em size

9 years agocss: always get default font size in pixels
Matt Watson [Tue, 12 Apr 2016 01:18:31 +0000 (18:18 -0700)]
css: always get default font size in pixels

Fixes a couple bugs...

 - Pixel font sizes in css would render as point sizes.

 - For em font sizes, where the parent size was set and not default, we would
   incorrectly convert a pixel value from points to pixels.

We'll always grab the default font size in pixels so we don't keep confusing
things.

Worth noting that gtk css font-size will still behave differently than the
web. Pango interprets font-size differently.

9 years agoapp: add missing g_returns
Sébastien Wilmet [Sun, 10 Apr 2016 14:58:49 +0000 (16:58 +0200)]
app: add missing g_returns

And have the g_returns in the same order as the function parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoGDK W32: Deduplicate reparenting
Руслан Ижбулатов [Mon, 11 Apr 2016 07:07:14 +0000 (07:07 +0000)]
GDK W32: Deduplicate reparenting

gdk_window_reparent() already changes children list for old and new parent.
Doing so twice results in a circular reference in the list, which can hang
the application later, for example in gtk_window_show().

https://bugzilla.gnome.org/show_bug.cgi?id=764845

9 years agogtk: Annotate GtkFlowBoxCreateWidgetFunc as "transfer full"
Rico Tzschichholz [Tue, 12 Apr 2016 11:30:04 +0000 (13:30 +0200)]
gtk: Annotate GtkFlowBoxCreateWidgetFunc as "transfer full"

9 years agoGtkTrayIcon: fix uninitialised variable
Balló György [Sun, 10 Apr 2016 19:42:04 +0000 (21:42 +0200)]
GtkTrayIcon: fix uninitialised variable

https://bugzilla.gnome.org/show_bug.cgi?id=764863

9 years agodocumentation: trivial typo fixes in GtkWidget
Mohammed Sadik [Tue, 12 Apr 2016 01:24:35 +0000 (06:54 +0530)]
documentation: trivial typo fixes in GtkWidget

https://bugzilla.gnome.org/show_bug.cgi?id=764925

9 years agowin32: rollback change and use _gdk_display
Ignacio Casal Quinteiro [Mon, 11 Apr 2016 20:22:37 +0000 (22:22 +0200)]
win32: rollback change and use _gdk_display

This makes usage of _gdk_display again when creating a window.
This is needed because there is a window created when the display
is being initialized, so it becomes a chicken and egg problem.
For now we roll back this to fix the wintab crash but we might
want to fix this again in the future by improving the wintab
initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=764664

9 years agowin32: add missing empty lines
Ignacio Casal Quinteiro [Mon, 11 Apr 2016 20:22:23 +0000 (22:22 +0200)]
win32: add missing empty lines

9 years agoUpdate Persian translations
Arash Mousavi [Mon, 11 Apr 2016 18:26:23 +0000 (22:56 +0430)]
Update Persian translations

9 years agogdkdevice: Expose tool as property
Matthias Clasen [Mon, 11 Apr 2016 15:57:46 +0000 (11:57 -0400)]
gdkdevice: Expose tool as property

This may occasionally be useful.

9 years agolistbox: Fix css node ordering
Matthias Clasen [Mon, 11 Apr 2016 11:52:39 +0000 (07:52 -0400)]
listbox: Fix css node ordering

When inserting a child at the top, we were not inserting its
css node properly.

https://bugzilla.gnome.org/show_bug.cgi?id=764710

9 years agobroadway: fix documentation
Mohammed Sadik [Sun, 10 Apr 2016 06:19:20 +0000 (11:49 +0530)]
broadway: fix documentation

broadway backend has 0 as the default display port,
which maps to tcp port 8080.

https://bugzilla.gnome.org/show_bug.cgi?id=764835

9 years agorecent-manager: Always ensure that size is reset on creation
Emmanuele Bassi [Sun, 10 Apr 2016 17:41:23 +0000 (18:41 +0100)]
recent-manager: Always ensure that size is reset on creation

Whenever we create a new GBookmarkFile, we need to set the size to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=620065

9 years agorecent-manager: Fix the error domain and message on move_item()
Emmanuele Bassi [Sun, 10 Apr 2016 17:39:33 +0000 (18:39 +0100)]
recent-manager: Fix the error domain and message on move_item()

Using NOT_FOUND when moving is wrong and unhelpful.

https://bugzilla.gnome.org/show_bug.cgi?id=620065

9 years agorecent-manager: Emit ::changed on file deletion
Emmanuele Bassi [Sun, 10 Apr 2016 17:28:01 +0000 (18:28 +0100)]
recent-manager: Emit ::changed on file deletion

This will clear out the list of recently used files, and will allow GVFS
to handle this case.

https://bugzilla.gnome.org/show_bug.cgi?id=693077

9 years agoAssign a recent manager if one is set
Emmanuele Bassi [Sun, 10 Apr 2016 16:51:58 +0000 (17:51 +0100)]
Assign a recent manager if one is set

The GtkRecentAction implementation ignored a GtkRecentManager passed to
its :manager property.

https://bugzilla.gnome.org/show_bug.cgi?id=620065

9 years agoapp: minor code improvements
Sébastien Wilmet [Sun, 10 Apr 2016 09:08:57 +0000 (11:08 +0200)]
app: minor code improvements

- use GDK_EVENT_PROPAGATE
- pass better zero-values to gtk_init(), since the parameters are
  pointers.

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoapp: improve code of extract_accels_from_menu()
Sébastien Wilmet [Sun, 10 Apr 2016 10:41:09 +0000 (12:41 +0200)]
app: improve code of extract_accels_from_menu()

sub_model is clearer than "m". And we don't use the key, so we can pass
NULL instead.

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoapp: use g_set_object()
Sébastien Wilmet [Sun, 10 Apr 2016 12:15:35 +0000 (14:15 +0200)]
app: use g_set_object()

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoapp: don't use deprecated function
Sébastien Wilmet [Sun, 10 Apr 2016 10:28:14 +0000 (12:28 +0200)]
app: don't use deprecated function

gtk_application_add_accelerator() is deprecated, but was still used
inside IGNORE_DEPRECATIONS's.

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoapp: improve doc of gtk_application_get_window_by_id()
Sébastien Wilmet [Sun, 10 Apr 2016 10:56:39 +0000 (12:56 +0200)]
app: improve doc of gtk_application_get_window_by_id()

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoapp: improve doc of gtk_application_set_accels_for_action()
Sébastien Wilmet [Sat, 9 Apr 2016 15:42:12 +0000 (17:42 +0200)]
app: improve doc of gtk_application_set_accels_for_action()

When reading the API for the first time I didn't know what was the
"detailed" action name.

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoapp: avoid code duplication for setting accels
Sébastien Wilmet [Sat, 9 Apr 2016 10:50:43 +0000 (12:50 +0200)]
app: avoid code duplication for setting accels

The implementation of the deprecated functions is now based on the
non-deprecated gtk_application_set_accels_for_action().

https://bugzilla.gnome.org/show_bug.cgi?id=764846

9 years agoFix gtk_scrollable_get_border annotation
Lukas K [Sun, 3 Apr 2016 13:31:05 +0000 (15:31 +0200)]
Fix gtk_scrollable_get_border annotation

https://bugzilla.gnome.org/show_bug.cgi?id=764540

9 years agoUpdated Bulgarian translation
Zahari Yurukov [Sun, 10 Apr 2016 13:31:35 +0000 (16:31 +0300)]
Updated Bulgarian translation

9 years agoquartz: zoom/rotate change compile/runtime check from 10.7 to 10.8
Friedrich Beckmann [Thu, 7 Apr 2016 07:33:41 +0000 (09:33 +0200)]
quartz: zoom/rotate change compile/runtime check from 10.7 to 10.8

The zoom/rotate change for quartz does not build on 10.7. This change
adds zoom/rotate support in quartz only for 10.8 and following. The
problems is described here:
https://bugzilla.gnome.org/show_bug.cgi?id=760276 and here
https://trac.macports.org/ticket/51052
NSEventPhaseMayBegin was only introduced in 10.8 although documentation
says it is introduced in 10.7. Tests on 10.7 indicate that the phase
property for the Magnify event is not supported at all on 10.7

9 years agoAdd a note about GDK_AXIS_X/Y
Matthias Clasen [Sat, 9 Apr 2016 21:35:58 +0000 (17:35 -0400)]
Add a note about GDK_AXIS_X/Y

These axes mmay or may not be present, best to ignore them.

9 years agowayland: Keyboard don't have x/y
Matthias Clasen [Sat, 9 Apr 2016 21:31:39 +0000 (17:31 -0400)]
wayland: Keyboard don't have x/y

These axes are not very useful in the first place, but on a
keyboard they just don't make any sense at all.

9 years agoMention geometry handling changes in release notes
Matthias Clasen [Sat, 9 Apr 2016 21:04:57 +0000 (17:04 -0400)]
Mention geometry handling changes in release notes

9 years agoinspector: simplify some code
Matthias Clasen [Sat, 9 Apr 2016 19:47:56 +0000 (15:47 -0400)]
inspector: simplify some code

9 years agoMove GdkDeviceTool into its own files
Matthias Clasen [Sat, 9 Apr 2016 19:20:07 +0000 (15:20 -0400)]
Move GdkDeviceTool into its own files

9 years agoapp: fix indentation
Sébastien Wilmet [Sat, 9 Apr 2016 13:21:27 +0000 (15:21 +0200)]
app: fix indentation

And add missing curly braces.

10 years agoinspector: Use GdkAxes instead of GdkAxisUse
Matthias Clasen [Sat, 9 Apr 2016 16:14:33 +0000 (12:14 -0400)]
inspector: Use GdkAxes instead of GdkAxisUse

10 years agoinspector: Add an origin mark to the slowdown scale
Matthias Clasen [Sat, 9 Apr 2016 15:54:07 +0000 (11:54 -0400)]
inspector: Add an origin mark to the slowdown scale

Makes it easier to get back to the original speed.

10 years agoinspector: Give the font scale an entry
Matthias Clasen [Sat, 9 Apr 2016 15:46:12 +0000 (11:46 -0400)]
inspector: Give the font scale an entry

This matches what Matt did for the slowdown.

10 years agodocs: trivial fixes in GtkApplication-related documentation
Sébastien Wilmet [Fri, 8 Apr 2016 18:13:07 +0000 (20:13 +0200)]
docs: trivial fixes in GtkApplication-related documentation

10 years agoanimatedstyle: don't share styleanimations
Matt Watson [Tue, 22 Mar 2016 08:10:21 +0000 (01:10 -0700)]
animatedstyle: don't share styleanimations

Because of our port of css animation and css transition to
progress tracker, we should not think of animated styles as
immutable objects that can map any timestamp to css values.
Rather, timestamps can correspond to different values depending
on the value of GTK_SLOWDOWN over the course of the animation.

To keep animated styles and style animations totally immutable,
we will not share styleanimations between animatedstyles, and
make a new copy of a styleanimation for each timestamp.

10 years agoanimatedstyle: just ref current style if timestamp the same
Matt Watson [Tue, 22 Mar 2016 08:04:38 +0000 (01:04 -0700)]
animatedstyle: just ref current style if timestamp the same

10 years agoanimatedstyle: fail to create new style if timestamp goes backwards
Matt Watson [Tue, 22 Mar 2016 07:54:11 +0000 (00:54 -0700)]
animatedstyle: fail to create new style if timestamp goes backwards

With slowdown factor, we will only we be able to handle timestamps
that monotonically increase.

10 years agocssanimation: port to progress tracker
Matt Watson [Fri, 25 Mar 2016 06:43:15 +0000 (23:43 -0700)]
cssanimation: port to progress tracker

10 years agocsstransition: port to progress tracker
Matt Watson [Mon, 7 Mar 2016 06:45:27 +0000 (22:45 -0800)]
csstransition: port to progress tracker

10 years agoentry: port to progress tracker
Matt Watson [Tue, 5 Apr 2016 06:44:04 +0000 (23:44 -0700)]
entry: port to progress tracker

10 years agoprogressbar: port to progress tracker
Matt Watson [Mon, 28 Mar 2016 08:08:48 +0000 (01:08 -0700)]
progressbar: port to progress tracker

10 years agoscrolledwindow: port indicator fade to progress tracker
Matt Watson [Mon, 28 Mar 2016 21:54:34 +0000 (14:54 -0700)]
scrolledwindow: port indicator fade to progress tracker

10 years agopopover: port to progress tracker
Matt Watson [Mon, 28 Mar 2016 21:45:21 +0000 (14:45 -0700)]
popover: port to progress tracker

10 years agoswitch: port to progress tracker
Matt Watson [Mon, 28 Mar 2016 21:38:22 +0000 (14:38 -0700)]
switch: port to progress tracker

10 years agorevealer: port to progress tracker
Matt Watson [Fri, 25 Mar 2016 09:01:25 +0000 (02:01 -0700)]
revealer: port to progress tracker

10 years agostack: skip first frame for animations
Matt Watson [Wed, 2 Mar 2016 01:19:50 +0000 (17:19 -0800)]
stack: skip first frame for animations

Not the ideal solution for this problem, but in practice leads to
much better performance on lower end hardware.

Stack does a double draw on the first frame of its animation, of
both the old contents (into a cairo surface) and the new contents.
Homogeneous stacks only need to reallocate contents on the first
frame.

On lower powered hardware where our frames will be a good deal
slower than the refresh rate anyway, we can assure a smother
experience by waiting a frame to start tweening where frame duration
will be more consistent.

10 years agostack: port to progress tracker
Matt Watson [Tue, 1 Mar 2016 06:24:39 +0000 (22:24 -0800)]
stack: port to progress tracker

10 years agoinspector: add slider to control slowdown factor
Matt Watson [Mon, 14 Mar 2016 10:38:55 +0000 (03:38 -0700)]
inspector: add slider to control slowdown factor

10 years agoprogresstracker: add GTK_SLOWDOWN environment variable
Matt Watson [Mon, 14 Mar 2016 10:38:23 +0000 (03:38 -0700)]
progresstracker: add GTK_SLOWDOWN environment variable

As we consolidate widgets to use progress tracker, this will allow
us to control the speed of all animations in a centralized place

10 years agoprogresstracker: simple struct to track animation progress
Matt Watson [Tue, 1 Mar 2016 05:39:33 +0000 (21:39 -0800)]
progresstracker: simple struct to track animation progress

10 years agodemos: Show slider/rotation axes in "Event axes" demo
Carlos Garnacho [Fri, 8 Apr 2016 15:25:53 +0000 (17:25 +0200)]
demos: Show slider/rotation axes in "Event axes" demo

10 years agowayland: Propagate slider/rotation axes from tools to devices
Carlos Garnacho [Fri, 8 Apr 2016 15:25:04 +0000 (17:25 +0200)]
wayland: Propagate slider/rotation axes from tools to devices

10 years agotest: do not remove files on distclean
Olivier Fourdan [Wed, 6 Apr 2016 17:44:16 +0000 (19:44 +0200)]
test: do not remove files on distclean

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764686

10 years agowayland: do not update shadows for child windows
Olivier Fourdan [Thu, 7 Apr 2016 13:56:46 +0000 (15:56 +0200)]
wayland: do not update shadows for child windows

glade-previewer places a gtkwindow inside another toplevel gtkwindow,
updating the shadow width for the client induces a busy loop where the
parent will grow continuously until it crashes gnome-shell/mutter.

To avoid the loop, do not update the shadow width if not dealing with a
toplevel window.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=761651

10 years agogdkevents: Fix GDK_AVAILABLE_IN annotation
Carlos Garnacho [Fri, 8 Apr 2016 13:08:15 +0000 (15:08 +0200)]
gdkevents: Fix GDK_AVAILABLE_IN annotation

These functions have just been added. An oversight prior to merging
wayland tablet.

10 years agowayland: Check the tablet manager before creating a wp_tablet_seat
Carlos Garnacho [Wed, 6 Apr 2016 15:29:11 +0000 (17:29 +0200)]
wayland: Check the tablet manager before creating a wp_tablet_seat

This makes things non-crashy if the compositor doesn't provide wp_tablet_manager

10 years agogtk3-demo: Add tool information to "Event axes" demo
Carlos Garnacho [Tue, 5 Apr 2016 12:33:29 +0000 (14:33 +0200)]
gtk3-demo: Add tool information to "Event axes" demo

Print tool type and serial, if found.

10 years agowayland: Hook tablets to GdkSeat
Carlos Garnacho [Tue, 26 Jan 2016 18:25:19 +0000 (19:25 +0100)]
wayland: Hook tablets to GdkSeat

Those are now also grabbed togetther with other master pointers,
so everything is able to interoperate on eg. popups triggered by
other devices.

10 years agowayland: Translate pen buttons into button events
Carlos Garnacho [Mon, 22 Jun 2015 16:28:46 +0000 (18:28 +0200)]
wayland: Translate pen buttons into button events

up/down already take GDK_BUTTON_PRIMARY, we translate BTN_STYLUS(2)
into GDK_BUTTON_MIDDLE/SECONDARY.

10 years agoWayland: Translate wl_tablet.down/up into button events
Stephen Chandler Paul [Mon, 22 Jun 2015 16:16:27 +0000 (18:16 +0200)]
Wayland: Translate wl_tablet.down/up into button events

These are sent with button=GDK_BUTTON_PRIMARY, axes must be also
included in these events, in addition to motion ones.

10 years agoWayland: Translate tool axes in motion events
Stephen Chandler Paul [Mon, 22 Jun 2015 16:02:50 +0000 (18:02 +0200)]
Wayland: Translate tool axes in motion events

On wayland, such axes are per-tool, we must update device capabilities
on the fly as new tools enter proximity, first the slave device so
it matches the current tool, and then the master device so it looks
the same than the current slave device.

10 years agoWayland: Implement proximity/crossing/motion event emission on tablets
Stephen Chandler Paul [Mon, 22 Jun 2015 15:51:48 +0000 (17:51 +0200)]
Wayland: Implement proximity/crossing/motion event emission on tablets

Each tablet will update its own GdkWaylandPointerData separately. This
commit only adds plain motion event emission so far, no axes are managed
yet.

10 years agoWayland: Add initial support for drawing tablets
Stephen Chandler Paul [Mon, 19 Jan 2015 00:32:24 +0000 (19:32 -0500)]
Wayland: Add initial support for drawing tablets

Only the management of tablets and tools is added so far. No tablet events
are yet interpreted.

As it's been the tradition in GTK+, erasers are split into their own device,
whereas the rest of the tools are meant to be routed through the
GDK_SOURCE_PEN device. Both pen/eraser devices are slaves to a master
pointer device, separate to wl_pointer's. This is so each tablet can
maintain its own cursor/positioning accounting.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
10 years agobuild: Bump wayland-protocols dependency to 1.3
Carlos Garnacho [Wed, 6 Apr 2016 13:49:22 +0000 (15:49 +0200)]
build: Bump wayland-protocols dependency to 1.3

Needed for tablet support

10 years agowayland: Refactor master pointer data into a separate struct
Carlos Garnacho [Fri, 19 Jun 2015 15:25:54 +0000 (17:25 +0200)]
wayland: Refactor master pointer data into a separate struct

This will enable multiple "pointers" to have separate data here.
Will come out useful when adding support for tablets, as they
will have a separate cursor for all purposes.

10 years agogdkcursor-wayland.c: Minor indentation fix
Stephen Chandler Paul [Sun, 18 Jan 2015 19:30:58 +0000 (14:30 -0500)]
gdkcursor-wayland.c: Minor indentation fix

Changed the tabs to spaces

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
10 years agox11: Use XInternAtom directly on poking device hardware IDs
Carlos Garnacho [Tue, 30 Jun 2015 14:28:59 +0000 (16:28 +0200)]
x11: Use XInternAtom directly on poking device hardware IDs

This way we don't cache the property if it wasn't previously there,
added by the driver itself. Bailing out is due there.

10 years agodemos: Enable multidevice behavior on event-axes demo
Carlos Garnacho [Thu, 18 Jun 2015 13:09:46 +0000 (15:09 +0200)]
demos: Enable multidevice behavior on event-axes demo

On wayland we get separate master/slaves for each tablet, we will
need to receive crossing events for each master pointer if there's
more than one around.

10 years agodemos: Set crossing events mask explicitly on event-axes demo.
Carlos Garnacho [Thu, 18 Jun 2015 13:08:39 +0000 (15:08 +0200)]
demos: Set crossing events mask explicitly on event-axes demo.

10 years agogtk3-demo: Show multiple master devices on the "Event axes" demo
Carlos Garnacho [Tue, 10 Feb 2015 14:59:18 +0000 (15:59 +0100)]
gtk3-demo: Show multiple master devices on the "Event axes" demo

10 years agogtk-demo: Add support for distance in event_axes
Stephen Chandler Paul [Tue, 10 Feb 2015 03:02:08 +0000 (22:02 -0500)]
gtk-demo: Add support for distance in event_axes

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
10 years agogtk-demo: Use GdkAxisUse instead of axis labels
Stephen Chandler Paul [Tue, 10 Feb 2015 00:44:50 +0000 (19:44 -0500)]
gtk-demo: Use GdkAxisUse instead of axis labels

Axis labels are very X specific, and are not really possible to port to other
backends such as Wayland. As such, it makes more sense to use GdkAxisUse and
GdkAxisUseFlag in order to determine the axis capabilities of a device and draw
their axes.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
10 years agoGdkDeviceTool: Add GdkAxisFlags info to tablet tools
Stephen Chandler Paul [Mon, 22 Jun 2015 15:19:16 +0000 (17:19 +0200)]
GdkDeviceTool: Add GdkAxisFlags info to tablet tools

Different tools may have different sets of axes, we should store that
info somewhere.

10 years agoGdkDeviceTool: Add GdkDeviceToolType to identify the physical tool type
Stephen Chandler Paul [Tue, 13 Jan 2015 05:03:49 +0000 (00:03 -0500)]
GdkDeviceTool: Add GdkDeviceToolType to identify the physical tool type

Because there are multiple different types of styluses that can be used with
tablets, we have to have some sort of identifier for them attached to the
GdkDeviceTool, especially since knowing the actual tool type for a GdkDeviceTool
is necessary for matching up a GdkDeviceTool with it's appropriate
GdkInputSource in Wayland (eg. matching up a GdkDeviceTool eraser with the
GDK_SOURCE_ERASER GdkInputSource of a wayland tablet).

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
10 years agox11: Set GdkDeviceTool on motion/button events
Carlos Garnacho [Tue, 6 Jan 2015 13:57:21 +0000 (14:57 +0100)]
x11: Set GdkDeviceTool on motion/button events

The last known tool from the device is used here. If no tool is known,
the event will just have a NULL pointer there.

10 years agox11: Update GdkDevices on "Wacom Serial IDs" property changes
Carlos Garnacho [Tue, 6 Jan 2015 13:56:02 +0000 (14:56 +0100)]
x11: Update GdkDevices on "Wacom Serial IDs" property changes

This takes care of the emission of GdkDevice::tool-changed, plus the
updating of the internal device accounting.